using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ShootThemUp.Sources.GameElements.Ships.Ennemies.Waves.Trajectories
{
    class HorizontalTrajectory : IWaveTrajectory
    {
        private int y;
        private bool direction;       
        
        public HorizontalTrajectory(int y,bool direction)
        {
            this.Y = y;
            this.Direction = direction;
        }

        private int Y
        {
            get { return y; }
            set { y = value; }
        }

        private bool Direction
        {
            get { return direction; }
            set { direction = value; }
        }

        public int GetX(float t){

            int result = (int)t;

            if (!this.Direction)
            {
                result = GameStateManagement.DEFAULT_PORTRAIT_SCREEN_WIDTH -result;
            }

            return result;
        }
        
        public int GetY(float t){
            return this.Y;
        }
    }
}
